﻿namespace Core
{
    public abstract class AbstractTask : Component
    {
        /// <summary>
        /// 获取或设置任务是否完成。
        /// </summary>
        public ETaskStatus Status { get; protected set; }

        /// <summary>
        /// 获取任务描述。
        /// </summary>
        public string Description { get; protected set; }

        public abstract void Start();
        public abstract void Update();
        public abstract void Finish();

        public override void Dispose()
        {
            if (IsDisposed) return;
            base.Dispose();

            Status = ETaskStatus.Todo;
            Description = string.Empty;
        }
    }
}
